package com.atguigu.day11.exer.e2;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/12 13:45
 * @注释
 */
public class Manager extends SalaryEmployee {
    private double ratio;

    public Manager(String name, double salary, MyDate myDates, double ratio) {
        super(name, salary, myDates);
        this.ratio = ratio;
    }

    @Override
    public double earning() {
        return super.earning() * (ratio + 1);
    }

    @Override
    public String toString() {
        return super.toString() + ", 奖金比例：" + ratio;
    }

    public double getRatio() {
        return ratio;
    }

    public void setRatio(double ratio) {
        this.ratio = ratio;
    }
}
